package com.rwb.springboot.sell.exception;

import com.rwb.springboot.sell.enums.ResultEnum;

/**
 * Created by ruwenbo on 2018/1/1.
 */
public class MallException extends RuntimeException {

    private Integer code;

    public MallException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public MallException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
